package com.example.kehoobackend.persistance;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.kehoobackend.domain.Question;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface QuestionMapper extends BaseMapper<Question> {

    //提出问题时插入问题-话题关系
    void insertIntoQuestionTopic(@Param("questionId") Integer questionId, @Param("topicId") Integer topicId);

    //找出某话题下的问题数量
    int selectQuestionCountByTopicId(@Param("topicId") Integer topicId);

    //找出某话题下的问题ID
    List<Integer> listQuestionIdByTopicId(@Param("topicId") Integer topicId);
}
